package com.example;

import com.example.servlet.RoleServlet;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App3 {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("RoleBean.xml");
        /* 只有一个当前类对象的情况下，可以直接通过类型去找对象 */
        RoleServlet roleServlet = context.getBean(RoleServlet.class);
        roleServlet.addRole();
    }
}
